Skip to content

[Bugfix #531] Fix: Restructure dashboard analytics sections, keep GitHub data source#533

Merged
waleedkadous merged 1 commit intomainfrom
builder/bugfix-531-dashboard-analytics-restructur
Feb 23, 2026
Merged

[Bugfix #531] Fix: Restructure dashboard analytics sections, keep GitHub data source#533
waleedkadous merged 1 commit intomainfrom
builder/bugfix-531-dashboard-analytics-restructur

Conversation

@waleedkadous
Copy link
Contributor

Summary

Restructures the dashboard Analytics tab per issue requirements: merges GitHub + Builders sections into a unified Activity section, adds protocol breakdown from status.yaml, adds Bugs Fixed metric, replaces pie charts with bar charts, and removes cost-per-project — all while keeping GitHub API as the primary data source.

Fixes #531

Root Cause

The analytics tab had separate GitHub and Builders sections that should be unified. The previous attempt (#529/#530) was reverted because it replaced GitHub API data with local artifact scanning, breaking completion counts.

Fix

Backend (analytics.ts):

  • Merged github + builders response keys into single activity section
  • Added bugsFixed count (closed issues with bug label)
  • Added projectsByProtocol from codev/projects/*/status.yaml (supplementary source)
  • Removed bugBacklog, nonBugBacklog (open issues backlog)
  • Removed costByProject from consultation section
  • Kept all GitHub API calls unchanged (fetchMergedPRs, fetchClosedIssues)
  • Normalizes legacy spider protocol to spir

Frontend (AnalyticsView.tsx):

  • Merged GitHubSection + BuildersSection into ActivitySection
  • Protocol breakdown displayed prominently at top with per-protocol counts + bar chart
  • Replaced MiniPieChart with MiniBarChart for consultation review type and protocol
  • Removed MiniPieChart component and PieChart/Pie imports
  • Removed Cost per Project sub-section
  • Removed Open Issue Backlog chart

API types (api.ts): Updated AnalyticsResponse interface to match new shape.
Tower routes: Updated fallback empty response for new structure.

Test Plan

  • Regression tests updated (backend: 33 tests, frontend: 17 tests, tower-routes: 59 tests)
  • Build passes (tsc --noEmit)
  • All tests pass
  • Tests verify: no github/builders top-level keys, no costByProject, Activity section renders, protocol breakdown works, spider→spir normalization, bugsFixed count, no Open Issue Backlog, no Cost per Project

CMAP Review

Pending

@waleedkadous
Copy link
Contributor Author

Architect Integration Review

Verdict: APPROVE

Critical validation — GitHub API is preserved as primary data source (unlike reverted #530):

  • fetchMergedPRs + fetchClosedIssues still power all core metrics
  • projectsCompleted from merged PRs via parseAllLinkedIssues
  • bugsFixed from closed issues with bug label
  • status.yaml used only for projectsByProtocol (supplementary)

All requirements met:

  • github + builders → merged into single activity section
  • Protocol breakdown prominent at top of Activity section
  • Backlog removed → replaced with bugsFixed
  • costByProject removed
  • Pie charts → bar charts
  • spiderspir normalization

109 tests passing. No regressions.


Architect integration review

@waleedkadous waleedkadous merged commit ea6f47d into main Feb 23, 2026
6 checks passed
@waleedkadous waleedkadous deleted the builder/bugfix-531-dashboard-analytics-restructur branch February 23, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard analytics: restructure sections, keep GitHub data source

1 participant